<template>
  <div class="study">
    <page-content
      :contentTableConfig="contentTableConfig"
      pageName="evaluate"
      ref="pageContentRef"
      @editBtnClick="handleeditClick"
      :Edshow="Edshow"
      :isSelect="isSelect"
      :selectOptions="selectOptions"
    >
      <template #isEvaluate="scope">
        <el-button plain size="mini" type="success">
          <template v-if="scope.row.isEvaluate === 0"> 未审核 </template>
          <template v-if="scope.row.isEvaluate === 1"> 已审核 </template>
        </el-button>
      </template>
    </page-content>
    <page-modal
      pageName="evaluate"
      :modalConfig="modalConfig"
      modalName="审核"
      :default-info="defaultInfo"
      ref="refPageModal"
    ></page-modal>
  </div>
</template>

<script lang="ts">
import { defineComponent, onUnmounted, reactive, ref } from 'vue'
import { contentTableConfig } from './congif/content.config'
import PageContent from '@/components/page-content'
import usePageModal from '@/hooks/use-page-modal'
import { modalConfig } from './congif/modal.config'
import PageModal from '@/components/page-modal'
import cache from '@/utils/cache'
export default defineComponent({
  components: {
    PageContent,
    PageModal
  },
  name: 'study',
  setup() {
    const [refPageModal, defaultInfo, handleNewClick, handleeditClick] =
      usePageModal()

    const selectOptions = reactive([
      {
        value: 1,
        label: '以审核'
      },
      {
        value: 0,
        label: '未审核'
      }
    ])
    const isSelect = ref(true)
    const Edshow = ref(true)
    onUnmounted(() => {
      cache.deleteCache('Selectvalue')
    })
    return {
      contentTableConfig,
      selectOptions,
      isSelect,
      Edshow,
      refPageModal,
      defaultInfo,
      handleNewClick,
      handleeditClick,
      modalConfig
    }
  }
})
</script>

<style scoped></style>
